<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body></body>
</html>
<script>
  for (var i = 100; i <= 999; i++) {
    var g = i % 10;
    var s = parseInt((i / 10) % 10);
    var b = parseInt(i / 100);
    if (g * g * g + s * s * s + b * b * b == i) {
      console.log(i);
    }
  }
</script>
